<!DOCTYPE HTML>
{% load i18n static main_tag %}
{% get_current_language as LANGUAGE_CODE %}
<html>
<head>
    <title>{% block title %}{{ order_info.order_code }}-production{% endblock %}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="{% static 'main/favicon.ico' %}">
    <meta name="keywords" content="">
    <style type="text/css">
        html {
            width: 100%;
        }

        body {
            font-family: 'Open Sans', sans-serif;
            font-size: 13px;
            width: 100%;
            text-align: left;
        }

        td.logo {
          width: 140px;
        }

        .page {
            width: 660px;
            margin-top: 0;
            margin-bottom: 0;
            margin-right: auto;
            margin-left: auto;
            background-color: #ffffff;
            padding-top: 30px;
            padding-bottom: 30px;
            padding-right: 40px;
            padding-left: 40px;
        }

        .container {
            width: 100%;
        }

        h2 {
            text-align: center;
            font-size: 30px;
        }

        th {
            font-size: 14.5px;
        }

        table, tr, th, td {
            padding: 0;
            margin: 0;
        }

        table {
            width: 100%;
            border-collapse:collapse;
        }

        table.equipment_list_contract thead tr.list_header th{
            background-color: #63B8FF;
            text-align: center;
        }

        table.equipment_list_contract th, table.equipment_list_contract td {
            border: solid black;
            border-top-width:1px;
            border-right-width:1px;
            border-bottom-width:1px;
            border-left-width:1px;
            padding: 5px;
        }

        table.equipment_list td, table.equipment_list th, table.other_cost th, table.other_cost td {
            border: solid black;
            border-top-width:0px;
            border-right-width:1px;
            border-bottom-width:0px;
            border-left-width:1px;
            padding: 5px;
        }

        table.total_cost td, table.total_cost th {
            /* border: solid black; */
            border-top-width:1px;
            border-right-width:1px;
            border-bottom-width:1px;
            border-left-width:1px;
            padding: 5px;
        }

        table.notes td, table.client td, table.client th {
            padding: 5px;
        }

    </style>{% if request.GET.v == 'page' %}
    <link href="{% static 'main/css/main.css' %}" rel="stylesheet">{% else %}
    <link href="{% static 'main/css/main-pdf.css' %}" rel="stylesheet">{% endif %}
</head>
<body>
<div class="main-content">
    <div class="page">
        <div class="container">
            {% block page_header %}{% include 'main/page_header_quotation.html' %}{% endblock %}
            <h2>{% trans '生产订单明细' %}</h2>
            <div class="row" style="height:10px;"></div>
            <table class="equipment_list_contract">
                <thead>
                    <tr class="list_header">
                        <th>{% trans 'No.' %}</th>
                        <th>{% trans '项目' %}</th>
                        <th>{% trans '数量' %}</th>
                        <th>{% if LANGUAGE_CODE == 'en' %}Unit{% else %}{% trans '单位' %}{% endif %}</th>
                    </tr>
                </thead>
                <tbody>{% for item in item_list %}
                    <tr>
                        <td style="text-align:center;width:30px;">{{ forloop.counter }}</td>
                        <td>{{ item.equipment.equipment_code }} / {% if LANGUAGE_CODE == 'en' %}{{ item.equipment.equipment_en }}{% else %}{{ item.equipment.equipment_cn }}{% endif %}</td>
                        <td style="text-align:center;width:100px;">{{ item.amount }}</td>
                        <td style="text-align:center;width:100px;">{% if LANGUAGE_CODE == 'en' %}{{ item.equipment.equipment_unit.equipment_unit_en }}{% else %}{{ item.equipment.equipment_unit.equipment_unit_cn }}{% endif %}</td>
                    </tr>
                    <tr>
                        <td rowspan="3"></td>
                        <td>{{ item.equipment.equipment_para_cn|safe|linebreaks }}</td>
                        <td colspan="2" valign="top">
                            {% if request.user.is_authenticated %}
                                {% if item.equipment.drawing_cn %}
                                    <a href="{{ item.equipment.drawing_cn|qiniu }}"  target="_blank"><span>{% trans '中文图纸' %}</span></a>
                                {% endif %}{% if item.equipment.drawing_en %}
                                    <a href="{{ item.equipment.drawing_en|qiniu }}"  target="_blank"><span>{% trans '英文图纸' %}</span></a>
                                {% endif %}{% if item.equipment.file_cn %}
                                    <a href="{{ item.equipment.file_cn|qiniu }}"  target="_blank"><span>{% trans '中文资料' %}</span></a>
                                {% endif %}{% if item.equipment.file_en %}
                                    <a href="{{ item.equipment.file_en|qiniu }}"  target="_blank"><span>{% trans '英文资料' %}</span></a>
                                {% endif %}{% if item.equipment.file_3d %}
                                    <a href="{{ item.equipment.file_3d|qiniu }}"  target="_blank"><span>{% trans '3D图纸' %}</span></a>
                                {% endif %}{% if item.equipment.equipment_img %}
                                    <a href="{{ item.equipment.equipment_img|qiniu }}"  target="_blank"><span>{% trans '设备图片' %}</span></a>
                                {% endif %}
                            {% endif %}
                            {% if item.equipment.equipment_img %}
                            <img src="{{ item.equipment.equipment_img|qiniu }}" width="200" alt="{{ item.equipment.equipment_en }}" />
                            {% endif %}
                        </td>
                    </tr>
                    <tr>
                        <td>{{ item.equipment_notes|linebreaks }}</td>
                        <td colspan="2">设备备注</td>
                    </tr>
                    <tr>
                        <td>{{ item.equipment.related_materials|linebreaks }}</td>
                        <td colspan="2">关联材料</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>{% if order_info.show_app_notes %}
            <table>
                <tbody>
                    <tr>
                        <td>{{ order_info.app_notes|linebreaks }}</td>
                    </tr>
                </tbody>
            </table>{% endif %}
            <table>
                <tbody>
                    <tr>
                        <td></td>
                        <th style="width:80px;">{% trans '销售人员:' %}</th>
                        <td style="width:5px;"></td>
                        <td style="width:150px;">{{ order_info.salesman.name }}</td>
                    </tr>
                    <tr>
                        <td></td>
                        <th style="width:80px;">{% trans '联系电话:' %}</th>
                        <td style="width:5px;"></td>
                        <td style="width:150px;">{{ order_info.salesman.mobile }}</td>
                    </tr>
                    <tr>
                        <td></td>
                        <th style="width:80px;">{% trans 'E-mail:' %}</th>
                        <td style="width:5px;"></td>
                        <td style="width:150px;">{{ order_info.salesman.email }}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="footer">
    <p></p>
</div>
</body>
</html>

